import logging
from abc import ABC, abstractmethod


class BaseTerminationCondition(ABC):
    """
    基本TerminationCondition类,特定于条件的get_termination方法在子类中实现
    """
    def __init__(self, config):
        self.config = config
        
    @abstractmethod
    def get_termination(self, task, env, agent_id, info={}):
        """
        返回事件是否应终止。
        """
        raise NotImplementedError
    
    def log(self, msg):
        logging.debug(msg)